{include file="public/header" /}
<form method="post" name="remark_form" id="remark_form" action="{:url('Goods/goods_verify')}" onSubmit="return confirm();">
    <input type="hidden" value="{$commonids}" name="commonids">
    <div class='page'>
    <table class="ds-default-table nobdb">
        <tbody>
            <tr class="noborder">
                <td colspan="2" class="required"><label>{$Think.lang.verify_state}:</label></td>
            </tr>
            <tr class="noborder">
                <td class="vatop rowform onoff">
                    <label for="rewrite_enabled_1"  class="cb-enable selected" title="{$Think.lang.ds_yes}>"><span>{$Think.lang.ds_yes}</span></label>
                    <label for="rewrite_disabled_2" class="cb-disable" title="{$Think.lang.ds_no}"><span>{$Think.lang.ds_no}</span></label>
                    <input id="rewrite_enabled_1" name="verify_state"  value="1" type="radio" checked="checked" >
                    <input id="rewrite_disabled_2" name="verify_state" value="0" type="radio">
                </td>

            </tr>
            <tr dstype="reason" style="display: none;">
                <td colspan="2" class="required"><label for="verify_reason">{$Think.lang.verify_reason}:</label></td>
            </tr>
            <tr class="noborder" dstype="reason" style="display :none;">
                <td class="vatop rowform"><textarea rows="6" class="tarea" cols="60" name="verify_reason" id="verify_reason"></textarea></td>
            </tr>
        </tbody>
        <tfoot>
            <tr class="tfoot">
                <td colspan="2">
                    <input class="btn" type="submit" value="{$Think.lang.ds_submit}"/>
                </td>
            </tr>
        </tfoot>
    </table>
    </div>
</form>
<script src="{$Think.PLUGINS_SITE_ROOT}/layui/layui.js"></script>
<script>
    function confirm(){

            var verify_state =  $('input[name="verify_state"]:checked').val();
             
            if(verify_state != 1){
                //alert(verify_state);return false;
                verify_reason =  $('#verify_reason').val();
               // alert(verify_reason);return false;
                if(verify_reason.replace(/\s+/g,"") == ''){
                    layer.msg('请填写违规理由');return false;
                }
            }
           // alert(2222);return false;
        }

    $(function() {
         $('input[name="verify_state"]').click(function() {

            if ($(this).val() == 1) {
                $('tr[dstype="reason"]').hide();
            } else {
                $('tr[dstype="reason"]').show();
            }
        });
    });
</script>